<% 
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
	include("/pages/template/head.html"){}
	include("/static/component/include/my97.html"){}
%>
<script type="text/javascript">
var oper = {
	save:function(id){
		if(!validForm()) {
			return false;
		}
		id = id || '0';
		var url = 'dict/save/'+id;
		form1.action = url;
		form1.submit();
		return true;
	}	
};
</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal">
	<input type="hidden" name="model.detail_id" value="${item.detail_id}" />
	<!-- 数据列表 -->
	<table class="table">
		<tr>
			<td>类型</td>
			<td>
			<% if(item.detail_id!0 > 0) { %>
			<input type="hidden" name="model.dict_type" value="${item.dict_type}" />
			<select disabled="disabled"  class="form-control" >
				${optionList }
			</select>
			<% } else { %>
			<select name="model.dict_type"  class="form-control" >
				${optionList }
			</select>
			<% } %>
			</td>
		</tr>
		<tr>
			<td>名称</td>
			<td><input type="text" name="model.detail_name" class="form-control" 
				value="${item.detail_name}" /></td>
		</tr>
		<tr>
			<td>编号</td>
			<td><input type="text" name="model.detail_code" class="form-control" 
				value="${item.detail_code}" /></td>
		</tr>
		<tr>
			<td>排序号</td>
			<td><input type="text" name="model.detail_sort" class="form-control" 
				value="${strutil.nvl(item.detail_sort,'0')}" /></td>
		</tr>
		<tr>
			<td></td>
			<td>
			
			</td>
		</tr>
	</table>
	
	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
	  <div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
	  		<button class="btn btn-primary" onclick="return oper.save(${item.detail_id});">保 存</button>
			<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
	  </div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>

